/**
 * 封装所有的请求
 */ 
import request from './request';

 // love(收藏)模块
export const $loveChange = (data={})=> {
    // 不展示loading
    data.skipLoading = true;
    return request.post('/love/change',data);
}
export const $loveList = (params={})=> {
    return request.get('love/list',{params});
}
export const $loveDetail = (params={})=> {
    return request.get('love/detail',{params});
} 

//  browse(历史记录)模块
export const $browseList = (params={})=> {
    return request.get('browse/list',{params});
}
export const $browseDetail = (params={})=> {
    return request.get('browse/detail',{params});
}

export const $browseDel = (data={})=> {
    return request.post('/browse/del',data);
}
export const $browseAdd = (data={})=> {
    data.skipLoading = true;
    return request.post('/browse/add',data);
} 

// discover(发现)模块
export const $discoverList = (params={})=> {
    return request.get('discover/list',{params});
}
export const $discoverDetail = (params={})=> {
    return request.get('discover/detail',{params});
} 

// house(房子)模块
export const $houseDetail = (params={})=> {
    return request.get('house/detail',{params});
} 
export const $houseIntroduction = (params={})=> {
    return request.get('house/introduction',{params});
} 
export const $houseComment = (params={})=> {
    return request.get('house/comment',{params});
} 
export const $houseScene = (params={})=> {
    return request.get('house/scene',{params});
} 
export const $houseCity = (params={})=> {
    return request.get('house/city',{params});
} 
export const $houseAround = (params={})=> {
    return request.get('house/around',{params});
} 
export const $houseList = (params={})=> {
    return request.get('house/list',{params});
} 
export const $houseRecommend = (params={})=> {
    return request.get('house/recommend',{params});
}   


// user(用户)模块
export const $userGetSmsCode = (data={})=> {
    return request.post('/user/getSmsCode',data);
}

export const $userLoginBySmsCode = (data={})=> {
    return request.post('/user/loginBySmsCode',data);
} 